require_extension('D');
require_extension(EXT_ZFA);
require_fp;
{
  const uint64_t bits[32] = {
    [0b00000] = 0xbff0000000000000ull,  /* -1.0 */
    [0b00001] = 0x0010000000000000ull,  /* minimum positive normal */
    [0b00010] = 0x3ef0000000000000ull,  /* 1.0 * 2^-16 */
    [0b00011] = 0x3f00000000000000ull,  /* 1.0 * 2^-15 */
    [0b00100] = 0x3f70000000000000ull,  /* 1.0 * 2^-8  */
    [0b00101] = 0x3f80000000000000ull,  /* 1.0 * 2^-7  */
    [0b00110] = 0x3fb0000000000000ull,  /* 1.0 * 2^-4  */
    [0b00111] = 0x3fc0000000000000ull,  /* 1.0 * 2^-3  */
    [0b01000] = 0x3fd0000000000000ull,  /* 0.25 */
    [0b01001] = 0x3fd4000000000000ull,  /* 0.3125 */
    [0b01010] = 0x3fd8000000000000ull,  /* 0.375 */
    [0b01011] = 0x3fdc000000000000ull,  /* 0.4375 */
    [0b01100] = 0x3fe0000000000000ull,  /* 0.5 */
    [0b01101] = 0x3fe4000000000000ull,  /* 0.625 */
    [0b01110] = 0x3fe8000000000000ull,  /* 0.75 */
    [0b01111] = 0x3fec000000000000ull,  /* 0.875 */
    [0b10000] = 0x3ff0000000000000ull,  /* 1.0 */
    [0b10001] = 0x3ff4000000000000ull,  /* 1.25 */
    [0b10010] = 0x3ff8000000000000ull,  /* 1.5 */
    [0b10011] = 0x3ffc000000000000ull,  /* 1.75 */
    [0b10100] = 0x4000000000000000ull,  /* 2.0 */
    [0b10101] = 0x4004000000000000ull,  /* 2.5 */
    [0b10110] = 0x4008000000000000ull,  /* 3 */
    [0b10111] = 0x4010000000000000ull,  /* 4 */
    [0b11000] = 0x4020000000000000ull,  /* 8 */
    [0b11001] = 0x4030000000000000ull,  /* 16 */
    [0b11010] = 0x4060000000000000ull,  /* 2^7 */
    [0b11011] = 0x4070000000000000ull,  /* 2^8 */
    [0b11100] = 0x40e0000000000000ull,  /* 2^15 */
    [0b11101] = 0x40f0000000000000ull,  /* 2^16 */
    [0b11110] = 0x7ff0000000000000ull,  /* +inf */
    [0b11111] = defaultNaNF64UI
  };
  WRITE_FRD_D(f64(bits[insn.rs1()]));
}
